floatrange (threshold type)
Thresholds with type="floatrange" enable a customizable interval
outside which a float result is considered
invalid.
This is an example definition:
{name="FloatValue", type="floatrange", range={0, 100}, default={10, 100}}
This is how it appears in the result section of the tool panel. The threshold is indicated with a slider with two handles for setting the threshold interval. The value of the result with the same name as the threshold is indicated in the same control:
The current values of a floatrange-threshold are accessed via
self.thresholds in execute, which provides a Threshold
instance. To base the overall result of the tool on the threshold a
value for Pass needs to be set in the output:
local someValue = getValue() output:add("Pass", self.thresholds.FloatValue:contains(someValue))
See also
intrange (threshold type) corresponding type for integer values